#pragma once

#include <AVUIAnimatable.h>
#include <AVUITransform.h>

namespace AVUI {

class Effect : public Animatable
{
public:
    DECLARE_ELEMENT(Effect, Animatable);

#pragma region Public Properties

    static Brush* get_ImplicitInput();

#pragma endregion Public Properties

protected:

#pragma region Protected Methods
    Effect();
#pragma endregion Protected Methods

public:

#pragma region Public Properties

#pragma region Internal Methods

    TRefCountedPtr<GeneralTransform> CoerceToUnitSpaceGeneralTransform(TRefCountedPtr<GeneralTransform> pGT, const Rect& worldBounds);
    static Point UnitToWorld(const Point& unitPoint, const Rect& worldBounds);
    static Rect UnitToWorld(const Rect& unitRect, const Rect& worldBounds);
    static Nullable<Point> WorldToUnit(const Point& worldPoint, const Rect& worldBounds);
    static Nullable<Rect> WorldToUnit(const Rect& worldRect, const Rect& worldBounds);

#pragma endregion Internal Methods

#pragma region Internal Properties

    virtual TRefCountedPtr<GeneralTransform> get_EffectMapping() { return Transform::get_Identity(); }

#pragma endregion Internal Properties

private:
 
    TRefCountedPtr<GeneralTransform> m_pMRUInnerGeneralTransform;
    Rect m_mruWorldBounds;
    TRefCountedPtr<GeneralTransform> m_pMRUWorldSpaceGeneralTransform;
    static TRefCountedPtr<Brush> m_pImplicitInputBrush;
};

}; // namespace AVUI
